package com.xaicode.template.activemq.config;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author cjxia@isoftstone.com
 * @date 2022/4/18 0018 17:47
 */
@Component
public class TopicConsumer {

    public static final String TOPIC_NAME = "CRZS_TRANSFER_SYSTEM";

    // 监听的队列名称
    @JmsListener(destination = TOPIC_NAME, containerFactory = "MyjmsTopicListener")
    public void receiveAddFriend(Map<String, Object> msg) {
        String o = msg.get("Msg").toString();
        System.out.println(o);
    }

}
